<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<!-- 容器 -->
<div id="root">
    <ul>
        <li v-for="person in persons" :key="person.id">
            {{person.name}}-{{person.age}}
        </li>
    </ul>
    <ul>
        <li v-for="(value,k) of car" :key="k">
            {{value}}--------{{k}}
        </li>
    </ul>
    <ul>
        <li v-for="(value,index) of str" :key="index">
            {{value}}--------{{index}}
        </li>
    </ul>
</div>
<script type="text/javascript">
    new Vue({
        el: '#root',
        data:{
            persons:[
                {id:1,name:'张三',age:20},
                {id:2,name:'王五',age:30},
                {id:3,name:'李四',age:25},
            ],
            car:{
                name:'宝马',
                price:100000,
                color:'红色',
            },
            str:'hello',
        },
    })
</script>
</body>
</html>